package com.mysteel.member.exception;

import org.springframework.http.HttpStatus;

/**
 * ProjectName: mail
 * ClassName: CommonException
 * Description:
 * date: 2021/03/06/006 16:29
 *
 * @author xiaochao
 */
public class CommonException extends Exception {
    private static final long serialVersionUID = -6826437542331141808L;

    private String msg;
    private Integer code = HttpStatus.INTERNAL_SERVER_ERROR.value();

    public CommonException(String msg) {
        super(msg);
        this.msg = msg;
    }

    public CommonException(String msg, Throwable e) {
        super(msg, e);
        this.msg = msg;
    }

    public CommonException(Integer code, String msg) {
        super(msg);
        this.msg = msg;
        this.code = code;
    }

    public CommonException(Integer code, String msg, Throwable e) {
        super(msg, e);
        this.msg = msg;
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

}

